import java.util.Scanner;

/**
 * @author zyj
 * @date 2022年05月25日 11:31
 */
public class 杨辉三角 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入行数");
        int h = sc.nextInt();
        int[][] arr = new int[h][h];

        for (int i = 0; i < arr.length; i++) {
            arr[i][0] = 1;
            arr[i][i] = 1;
        }

        for (int i = 2; i < arr.length; i++) {
            for (int j = 1; j < i; j++) {
                arr[i][j] = arr[i-1][j-1] + arr[i-1][j];
            }
        }

        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < h-i-1; j++) {
                System.out.print(" ");
            }
            for (int j = 0; j <= i; j++) {
                System.out.print(arr[i][j] + " ");
            }
            System.out.println();
        }

        int HASH_BITS = 0x7fffffff;
        System.out.println(HASH_BITS);
    }
}
